


export interface SearchCondition {
    id: string;
    field: string;
    operator: SearchOperator | null;
    value: any;
}

export enum SearchOperator {
    EQUAL = '=',
    NOT_EQUAL = '!=',
    GREATER_THAN = '>',
    GREATER_THAN_OR_EQUAL = '>=',
    LESS_THAN = '<',
    LESS_THAN_OR_EQUAL = '<=',
    IN = 'in',
    // NOT_IN = 'not in',
    LIKE = 'like',
    // NOT_LIKE = 'not like',
    // IS_NULL = 'is null',
    // IS_NOT_NULL = 'is not null',
    // BETWEEN = 'between',
}
export const SearchOperatorOptions = [
    { label: '等于', value: SearchOperator.EQUAL },
    { label: '不等于', value: SearchOperator.NOT_EQUAL },
    { label: '大于', value: SearchOperator.GREATER_THAN },
    { label: '大于等于', value: SearchOperator.GREATER_THAN_OR_EQUAL },
    { label: '小于', value: SearchOperator.LESS_THAN },
    { label: '小于等于', value: SearchOperator.LESS_THAN_OR_EQUAL },
    { label: '包含', value: SearchOperator.IN },
    // { label: '不包含', value: SearchOperator.NOT_IN },
    { label: '模糊匹配', value: SearchOperator.LIKE },
    // { label: '不模糊匹配', value: SearchOperator.NOT_LIKE },
    // { label: '为空', value: SearchOperator.IS_NULL },
    // { label: '不为空', value: SearchOperator.IS_NOT_NULL },
    // { label: '在...之间', value: SearchOperator.BETWEEN },
]